<template>
  <div>
    <el-form-item label="签字板宽度">
      <el-input-number v-model="localData.width" controls-position="right" />
    </el-form-item>
    <el-form-item label="签字板高度">
      <el-input-number v-model="localData.height" controls-position="right" />
    </el-form-item>
    <el-form-item label="线条宽度">
      <el-input-number v-model="localData.lineWidth" controls-position="right" />
    </el-form-item>
    <el-form-item label="线条颜色">
      <el-color-picker v-model="localData.lineColor" />
    </el-form-item>
  </div>
</template>

<script>
export default {
  name: 'AnvilEsignConfig',
  props: {
    data: {
      type: Object,
      default: () => {}
    }
  },
  data() {
    return {
      localData: {}
    }
  },
  watch: {
    data: {
      handler(newVal) {
        if (newVal) {
          this.localData = newVal
        }
      },
      deep: true,
      immediate: true
    },
    localData: {
      handler(newVal) {
        this.$emit('update:data', newVal)
      },
      deep: true
    }
  }
}
</script>

<style scoped></style>
